Check `x-last-selected-text-primary'. Don't barf if it or
`x-last-selected-text' aren't bound.
(defvar mouse-sel-get-selection-function
(lambda (selection)
(if (eq selection 'PRIMARY)
- (or (x-cut-buffer-or-selection-value) x-last-selected-text)
+ (or (x-cut-buffer-or-selection-value)
+ (bound-and-true-p x-last-selected-text)
+ (bound-and-true-p x-last-selected-text-primary))
(x-get-selection selection)))
"Function to call to get the selection.
Called with one argument: